package com.example.myapplication;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

public abstract class BaseFgm extends Fragment {
  public View rootView;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        rootView = inflater.inflate(getlayout(),container,false);
        initView();
        setListener();
        logicStart();

        return rootView;

    }


    protected abstract void logicStart();

    protected abstract void initView();

    protected abstract void setListener();

    public void refreshState(){

    }

    protected abstract int getlayout();
}
